<!DOCTYPE html>
<html lang="zh">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="keywords" content="dromara.org" />
	<meta name="description" content="dromara.org" />
	<!-- 网页标签标题 -->
	<title>dromara(Open source organization)</title>
	<link rel="shortcut icon" href="/website/img/docsite.ico"/>
	<link rel="stylesheet" href="/website/build/documentation.css" />
</head>
<body>
	<div id="root"><div class="documentation-page" data-reactroot=""><header class="header-container header-container-normal"><div class="header-body"><a href="/website/zh-cn/index.html"><img class="logo" src="/website/img/dromara.png"/></a><div class="search search-normal"><span class="icon-search"></span></div><div class="header-menu"><img class="header-menu-toggle" src="/website/img/system/menu_gray.png"/><ul><li class="menu-item menu-item-normal"><a href="/website/zh-cn/index.html" target="_self">首页</a></li><li class="menu-item menu-item-normal menu-item-normal-active"><a href="/website/zh-cn/docs/soul/soul.html" target="_self">文档</a></li><li class="menu-item menu-item-normal"><a href="/website/zh-cn/blog/index.html" target="_self">博客</a></li><li class="menu-item menu-item-normal"><a href="/website/zh-cn/community/index.html" target="_self">社区</a></li></ul></div></div></header><div class="bar"><div class="bar-body"><img src="/website/img/system/docs.png" class="front-img"/><span>文档</span><img src="/website/img/system/docs.png" class="back-img"/></div></div><section class="content-section"><div class="sidemenu"><div class="sidemenu-toggle"><img src="https://img.alicdn.com/tfs/TB1E6apXHGYBuNjy0FoXXciBFXa-200-200.png"/></div><ul><li class="menu-item menu-item-level-1"><span>Soul</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/soul.html" target="_self">soul介绍</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/db.html" target="_self">数据库设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/config.html" target="_self">配置中心设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/request.html" target="_self">请求参数设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/selector.html" target="_self">选择器规则设计</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/preFilter.html" target="_self">前置过滤器设计</a></li><li style="height:324px;overflow:hidden" class="menu-item menu-item-level-2"><span>插件介绍<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/divide.html" target="_self">divide插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/dubbo.html" target="_self">dubbo插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/springcloud.html" target="_self">springcloud插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/rateLimiter.html" target="_self">rateLimiter插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/monitor.html" target="_self">monitor插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/waf.html" target="_self">waf插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/sign.html" target="_self">sign插件</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/rewrite.html" target="_self">rewrite插件</a></li></ul></li><li style="height:108px;overflow:hidden" class="menu-item menu-item-level-2"><span>部署文档<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/admin.html" target="_self">部署admin</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/soul/server.html" target="_self">部署server</a></li></ul></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/http.html" target="_self">使用手册</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/soul/extend.html" target="_self">扩展文档</a></li></ul></li><li class="menu-item menu-item-level-1"><span>Hmily</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/hmily/index.html" target="_self">介绍文档</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/hmily/configuration.html" target="_self">配置详解</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/hmily/admin.html" target="_self">启动admin</a></li><li style="height:144px;overflow:hidden" class="menu-item menu-item-level-2"><span>用户文档<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/user-dubbo.html" target="_self">dubbo用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/user-motan.html" target="_self">motan用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/user-springcloud.html" target="_self">springcloud用户</a></li></ul></li><li style="height:108px;overflow:hidden" class="menu-item menu-item-level-2"><span>快速体验<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/quick-start-dubbo.html" target="_self">quick-start-dubbo</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/hmily/quick-start-springcloud.html" target="_self">quick-start-springcloud</a></li></ul></li></ul></li><li class="menu-item menu-item-level-1"><span>raincat</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/index.html" target="_self">介绍文档</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/start-manager.html" target="_self">启动raincat-manager</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/config.html" target="_self">配置详解</a></li><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/raincat/admin.html" target="_self">启动admin</a></li><li style="height:144px;overflow:hidden" class="menu-item menu-item-level-2"><span>用户文档<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/user-dubbo.html" target="_self">dubbo用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/user-motan.html" target="_self">motan用户</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/user-springcloud.html" target="_self">springcloud用户</a></li></ul></li><li style="height:108px;overflow:hidden" class="menu-item menu-item-level-2"><span>快速体验<img style="transform:rotate(0deg)" class="menu-toggle" src="/website/img/system/arrow_down.png"/></span><ul><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/quick-start-dubbo.html" target="_self">quick-start-dubbo</a></li><li class="menu-item menu-item-level-3"><a href="/website/zh-cn/docs/raincat/quick-start-springcloud.html" target="_self">quick-start-springcloud</a></li></ul></li></ul></li><li class="menu-item menu-item-level-1"><span>myth</span><ul><li style="height:36px;overflow:hidden" class="menu-item menu-item-level-2"><a href="/website/zh-cn/docs/myth/index.html" target="_self">介绍文档</a></li></ul></li></ul></div><div class="doc-content markdown-body"><h1>环境准备</h1>
<ul>
<li>
<h4>JDK 1.8+</h4>
</li>
<li>
<h4>Maven 3.2.x</h4>
</li>
<li>
<h4>Git</h4>
</li>
</ul>
<h1>代码拉取</h1>
<pre><code>  &gt; git clone https://github.com/yu199195/hmily.git

  &gt; cd hmily

  &gt; mvn -DskipTests clean install -U
</code></pre>
<h1>执行demo 模块的sql语句。</h1>
<p>[sql语句] (<a href="https://github.com/yu199195/hmily/blob/master/hmily-demo/sql/hmily-demo.sql">https://github.com/yu199195/hmily/blob/master/hmily-demo/sql/hmily-demo.sql</a>)</p>
<h1>使用你的工具 idea 或者eclipse 打开项目。</h1>
<ul>
<li>修改业务数据库</li>
</ul>
<pre><code class="language-yml"><span class="hljs-attr">spring:</span>
<span class="hljs-attr">    datasource:</span>
<span class="hljs-attr">        driver-class-name:</span>  <span class="hljs-string">com.mysql.jdbc.Driver</span>
<span class="hljs-attr">        url:</span> <span class="hljs-attr">jdbc:mysql://192.168.1.68:3306/tcc_account?useUnicode=true&amp;characterEncoding=utf8</span>
<span class="hljs-attr">        username:</span> <span class="hljs-string">xiaoyu</span>
<span class="hljs-attr">        password:</span> <span class="hljs-string">Wgj@555888</span>
</code></pre>
<ul>
<li>修改事务日志数据库 (account项目为列子)</li>
</ul>
<pre><code class="language-yml"><span class="hljs-attr">org:</span>
<span class="hljs-attr">    dromara:</span>
         <span class="hljs-string">hmily</span> <span class="hljs-string">:</span>
            <span class="hljs-string">serializer</span> <span class="hljs-string">:</span> <span class="hljs-string">kryo</span>
            <span class="hljs-string">recoverDelayTime</span> <span class="hljs-string">:</span> <span class="hljs-number">128</span>
            <span class="hljs-string">retryMax</span> <span class="hljs-string">:</span> <span class="hljs-number">30</span>
            <span class="hljs-string">scheduledDelay</span> <span class="hljs-string">:</span> <span class="hljs-number">128</span>
            <span class="hljs-string">scheduledThreadMax</span> <span class="hljs-string">:</span>  <span class="hljs-number">10</span>
            <span class="hljs-string">repositorySupport</span> <span class="hljs-string">:</span> <span class="hljs-string">db</span>
<span class="hljs-attr">            started:</span> <span class="hljs-literal">false</span>
            <span class="hljs-string">hmilyDbConfig</span> <span class="hljs-string">:</span>
                 <span class="hljs-string">driverClassName</span>  <span class="hljs-string">:</span> <span class="hljs-string">com.mysql.jdbc.Driver</span>
                 <span class="hljs-string">url</span> <span class="hljs-string">:</span>  <span class="hljs-attr">jdbc:mysql://192.168.1.98:3306/tcc?useUnicode=true&amp;amp;characterEncoding=utf8</span>
                 <span class="hljs-string">username</span> <span class="hljs-string">:</span> <span class="hljs-string">root</span>
                 <span class="hljs-string">password</span> <span class="hljs-string">:</span> <span class="hljs-number">123456</span>

</code></pre>
<ul>
<li>在spring-dubbo中修改你的zookeeper地址</li>
</ul>
<pre><code class="language-xml"> <span class="hljs-tag">&lt;<span class="hljs-name">dubbo:registry</span> <span class="hljs-attr">protocol</span>=<span class="hljs-string">"zookeeper"</span> <span class="hljs-attr">address</span>=<span class="hljs-string">"192.168.1.148:2181"</span>/&gt;</span>
</code></pre>
<ul>
<li>
<h5>run  DubboHmilyAccountApplication.java</h5>
</li>
<li>
<h5>run  DubboHmilyInventoryApplication.java</h5>
</li>
<li>
<h5>run  DubboHmilyOrderApplication.java</h5>
</li>
<li>
<h4>访问 <a href="http://127.0.0.1:8087/swagger-ui.html">http://127.0.0.1:8087/swagger-ui.html</a></h4>
</li>
</ul>
</div></section><footer class="footer-container"><div class="footer-body"><img src="/website/img/dromara.png"/><div class="cols-container"><div class="col col-12"><h3>免责声明</h3><p>任何单位或个人转载本网站的所有相关信息，请注明来源。</p></div><div class="col col-6"><dl><dt>文档</dt><dd><a href="/website/zh-cn/docs/soul/soul.html" target="_self">概览</a></dd><dd><a href="/website/zh-cn/docs/soul/soul.html" target="_self">快速开始</a></dd><dd><a href="/website/zh-cn/docs/soul/soul.html" target="_self">开发者指南</a></dd></dl></div><div class="col col-6"><dl><dt>资源</dt><dd><a href="/website/zh-cn/blog/index.html" target="_self">博客</a></dd><dd><a href="/website/zh-cn/community/index.html" target="_self">社区</a></dd></dl></div></div><div class="copyright"><span>Copyright ©2018 549477611@qq.com by xiaoyu</span></div></div></footer></div></div>
	<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
	<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
	<script>
		window.rootPath = '/website';
  </script>
	<script src="/website/build/documentation.js"></script>
</body>
</html>